//
//  SectionHeaderView.m
//  Team
//
//  Created by lanou3g on 16/1/15.
//  Copyright © 2016年 ZJF. All rights reserved.
//

#import "SectionHeaderView.h"

@implementation SectionHeaderView


-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        [self addCustomView];
    }
    
    
    return self;
}


-(void)addCustomView{
    
    [self addSubview:self.label4Section];
    
    [self addSubview:self.btn4More];
}


-(UILabel *)label4Section{
    
    if (_label4Section == nil) {
        _label4Section = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 80, 30)];
        _label4Section.backgroundColor = [UIColor lightGrayColor];
        _label4Section.text = @"亲子资讯";
        _label4Section.textAlignment = 1;
        
    }
    
    return _label4Section;
}



-(UIButton *)btn4More{
    
    if (_btn4More == nil) {
        _btn4More = [UIButton buttonWithType:UIButtonTypeSystem];
        _btn4More.frame = CGRectMake(self.frame.size.width - 40, 0, 30, 30);
        _btn4More.backgroundColor = [UIColor lightGrayColor];
        [_btn4More setTitle:@"更多" forState:UIControlStateNormal];
        [_btn4More addTarget:self action:@selector(checkMore:) forControlEvents:UIControlEventTouchUpInside];
    }
    
    return _btn4More;
}



-(void)checkMore:(UIButton *)sender{
    
    NSLog(@"========");
}










/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
